<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%members}}".
 *
 * @property int $memberId 会员编号
 * @property string $memberKey 会员标识
 * @property string $mobile 会员名称
 * @property string $passwordKey 密码key
 * @property string $passwordHash 密码密文
 * @property int $ctime 注册时间
 */
class Members extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%members}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['ctime'], 'integer'],
            [['memberKey', 'passwordHash'], 'string', 'max' => 200],
            [['mobile', 'passwordKey'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'memberId' => Yii::t('app', 'Member ID'),
            'memberKey' => Yii::t('app', 'Member Key'),
            'mobile' => Yii::t('app', 'Mobile'),
            'passwordKey' => Yii::t('app', 'Password Key'),
            'passwordHash' => Yii::t('app', 'Password Hash'),
            'ctime' => Yii::t('app', 'Ctime'),
        ];
    }
}
